package top.layne.cloud.tsf.database.controller;

import com.github.pagehelper.PageHelper;
import io.swagger.models.auth.In;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.layne.cloud.tsf.api.entity.BmsCoupon;
import top.layne.cloud.tsf.database.service.CouponService;

import java.util.List;

/**
 * @author : layne
 * @Date: 2020/7/27
 * @Time: 11:04
 * Description:
 */
@RequestMapping("/coupon")
@RestController
public class CouponController {

    @Autowired
    private CouponService couponService;

    @GetMapping("/getCouponList")
    public List<BmsCoupon> getCouponList(Integer pageNum, Integer pageSize){
        PageHelper.startPage(pageNum,pageSize);
        return couponService.getCouponList();
    }
}
